package com.qingcloud.fexecutor.base.mapper;

import org.apache.ibatis.annotations.DeleteProvider;

import java.util.Collection;

/**
 * 生成insert语句时，主键也会一起生成，用于insert时保存主键的场景
 *
 * @author wangjinnan
 */
@tk.mybatis.mapper.annotation.RegisterMapper
public interface DeleteWithPrimaryKeyListMapper<T> {

    /**
     * 按主键列表删除
     *
     * @param pkCollection 主键列表
     * @return 删除的条数
     */
    @DeleteProvider(type = DeleteWithPrimaryKeyListProvider.class, method = "dynamicSQL")
    int deleteByPrimaryKeyList(Collection<?> pkCollection);

}
